from http.server import HTTPServer, BaseHTTPRequestHandler

host = ('localhost', 8990)

class RequestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        self.send_response(200)
        self.end_headers()
        self.wfile.write(b"Hello world from JAIL in FreeBSD!")


def start_http_service():
    server = HTTPServer(host, RequestHandler)
    print(f"Starting http server, listen at: {host[0]}:{host[1]}")
    server.serve_forever()

start_http_service()
